/* Copyright (c) 2017 Anish Athalye */
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro);

/* Basic styling */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-rendering: geometricPrecision;
}

html {
/*  font-size: 14px;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;*/
  font-family: "Source Sans Pro", sans-serif;
  font-size: 14pt;
  line-height: 1.5;
}

@media(min-width: 480px) {
  html {
    /*font-size: 16px;*/
    font-size: 14pt;
  }
}

body {
  margin: 0;
  color: #000;
  background-color: #fff;
  overflow-y: scroll;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: bold;
  /*text-decoration: underline;*/
  line-height: 1.25;
  font-size: 1rem;
}

h1 {
  margin-top: 1.25rem;
  font-size: 1.5rem;
}

h2 {
  margin-top: 1.25rem;
  font-size: 1.1rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

ul {
  list-style-position: inside;
  padding-left: 1rem;
}

ol {
  margin-left: 1rem;
}

li > ul {
  padding-left: 2rem;
}

ul li {
  list-style-type: none;
}

ul, ol {
  margin-bottom: 1rem;
}

ul ul, ol ul, ul ol, ol ol {
  margin-bottom: inherit;
}

ul li:before {
  content: "\2013  "; /* note: extra space needed because first is consumed by css parser */
  position: absolute;
  margin-left: -1rem;
}

ul.double-spaced li {
  margin-top: 1rem;
}

pre, code {
  font-family: "Source Code Pro", "Menlo", "DejaVu Sans Mono", "Lucida Console", monospace;
}

code {
  background-color: rgba(27,31,35,.05);
  border-radius: 3px;
  padding: 0 0.2rem;
  /*font-size: 0.9em;*/
  font-size: 12pt;
}

pre {
  color: #000;
  margin: 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px dashed #444;
  /*font-size: .8rem;*/
  font-size: 11pt;
  overflow-x: auto;
}

pre code {
  color: inherit;
  background: none;
  font-size: 100%;
  padding: 0;
}

a {
  color: #54008c;
  text-decoration: underline;
}

a:hover {
  color: #fff;
  background-color: #54008c;
}

img, video {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 5px;
  max-width: 100%;
  max-height: 80vh;
}

video {
  margin-bottom: 1rem;
}

summary {
  outline: none;
  user-select: none;
}

hr {
  position: relative;
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #fff;
}

/* Classes */

.title {
  font-size: 2rem;
}

.subtitle {
  font-size: 1.5rem;
  margin-left: 1rem;
}

.small {
  font-size: 0.75rem;
}

.small p {
  margin-bottom: 0;
}

.center {
  text-align: center;
}

.gap {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.accent {
  color: #8c0038;
}

.youtube-wrapper {
  position: relative;
  height: 0;
  margin-bottom: 1rem;
}

.youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Elements */

#content {
  max-width: 35rem;
  margin: auto;
  margin-bottom: 2rem;
  padding: 1rem 1rem 0 1rem;
}

.demo {
  margin-top: 2em;
  margin-bottom: 2em;
}

#nav-bg {
  margin: 0;
  padding: 0.25rem 1rem;
  font-family: "Source Code Pro", "Menlo", "DejaVu Sans Mono", "Lucida Console", monospace;
  background: #54008c;
  color: #fff;
}

#top-nav {
  max-width: 75rem;
  /* padding-left:8rem; */
  margin: auto;
  text-align: center;
}

#top-nav a {
  color: #fff;
  text-decoration: none;
}

#top-nav a:hover {
  color: #000;
  background-color: #fff;
}

a#logo {
  color: #f2deff;
}

a:hover#logo {
  color: #000;
}

#menu-icon {
  display: none;
}

.trigger {
  display: none;
}

input[type=checkbox]:checked ~ .trigger {
  display:block;
  margin: auto;
}

.menu-label {
  font-family: "Source Code Pro", "Menlo", "DejaVu Sans Mono", "Lucida Console", monospace;
}

input[type=checkbox] ~ .menu-label:after {
  content: "(+)";
}

input[type=checkbox]:checked ~ .menu-label:after {
  content: "(-)";
}

.nav-link {
  display: block;
}

.trigger-child {
  display: inline-block;
  text-align: initial;
}

.nav-link:before {
  content: "- ";
}

/* in terms of our fixed-width layout; if smaller than this, we want to
 * collapse the menu */
@media (min-width: 40rem) {
  .menu-label {
    display: none;
  }

  .trigger {
    display: inline;
    padding-top: inherit;
  }

  .trigger-child {
    display: inline;
    text-align: initial;
  }

  .nav-link {
    display: initial;
  }

  .nav-link:before {
    content: "| ";
  }
}

@media (prefers-color-scheme: dark) {

    body {
        background-color: #303030;
        color: #ddd
    }

    a {
      color: #66D9EF;
      /*color: #A6E22E;*/
      text-decoration: none;
    }

    a:hover {
      color: #000;
      background-color: #66D9EF;
      text-decoration: none;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #eee;
      }

    #nav-bg, a#logo, #top-nav a {
      background-color: #A6E22E;
      color: #202020;
    }

    a:hover > code  {
        background-color: #66D9EF;
    }

    .accent {
        color: #F92672;
    }
}

@media print {
  #nav-bg, #logo, #top-nav { display: none; }
  h1.title ~ p.center.gap.accent { display: none; }
  .youtube-wrapper { display: none; }
  html { font-size: 1em; font-family: sans-serif; }
  body { background: none; }
  #content { max-width: none; }
  h1.title { text-align: center; }
  h1, h2, h3, h4, h5, h6 { break-after: avoid-page; page-break-after: avoid; }
  #content hr:last-of-type { display: none; }
  #content pre { break-inside: avoid-page; page-break-inside: avoid; }
  #content div.small:last-of-type { display: none; }
}

.ribbon {
  background-color: #8cbcea;
  overflow: hidden;
  white-space: nowrap;
  /* top left corner */
  position: absolute;
  right: -50px;
  top: 40px;
  /* 45 deg ccw rotation */
  -webkit-transform: rotate(45deg);
     -moz-transform: rotate(45deg);
      -ms-transform: rotate(45deg);
       -o-transform: rotate(45deg);
          transform: rotate(45deg);
  /* shadow */
  -webkit-box-shadow: 0 0 10px #888;
     -moz-box-shadow: 0 0 10px #888;
          /* box-shadow: 0 0 10px #888; */
          box-shadow: 0px -1px 20px 0px #562c8c6b;
}
.ribbon a {
  border: 1px solid #000;
  color: #000;
  display: block;
  font: bold 81.25% "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 1px 0;
  padding: 10px 50px;
  text-align: center;
  text-decoration: none;
  /* shadow */
  /* text-shadow: 0 0 5px #444; */
}
